home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_gsl.idb / usr / freeware / include / gsl_siman.h.z / gsl_siman.h
Encoding:
C/C++ Source or Header  |  1999-07-16  |  1.8 KB  |  62 lines

  1. #ifndef GSL_SIMAN_H
  2. #define GSL_SIMAN_H
  3. #include <stdlib.h>
  4.  
  5. /* types for the function pointers passed to gsl_siman_solve */
  6.  
  7. typedef double (*gsl_Efunc_t) (void *xp);
  8. typedef void (*gsl_siman_step_t) (const gsl_rng *r, void *xp, double step_size);
  9. typedef double (*gsl_siman_metric_t) (void *xp, void *yp);
  10. typedef void (*gsl_siman_print_t) (void *xp);
  11.  
  12. /* this structure contains all the information needed to structure the
  13.    search, beyond the energy function, the step function and the
  14.    initial guess. */
  15.  
  16. typedef struct {
  17.   int n_tries;        /* how many points to try for each step */
  18.   int iters_fixed_T;    /* how many iterations at each temperature? */
  19.   double step_size;    /* max step size in the random walk */
  20.   /* the following parameters are for the Boltzmann distribution */
  21.   double k, t_initial, mu_t, t_min;
  22. } gsl_siman_params_t;
  23.  
  24. struct CA_rule {
  25.   char *str;
  26.   int k, n, length;
  27. };
  28.  
  29. typedef union u_Element {
  30.   double D1;
  31.   double D2[2];
  32.   double D3[3];
  33.   struct CA_rule rule;
  34. } Element ;
  35.  
  36. /* prototype for the workhorse function */
  37.  
  38. void gsl_siman_Usolve(const gsl_rng * r, 
  39.               Element *x0_p, double (*Efunc)(Element x),
  40.               void (*take_step)(Element *x_p, double step_size),
  41.               double distance(Element x, Element y),
  42.               void print_position(Element x),
  43.               gsl_siman_params_t params);
  44.  
  45. void gsl_siman_solve(const gsl_rng * r, 
  46.              void *x0_p, gsl_Efunc_t Ef,
  47.              gsl_siman_step_t take_step,
  48.              gsl_siman_metric_t distance,
  49.              gsl_siman_print_t print_position,
  50.              size_t element_size,
  51.              gsl_siman_params_t params);
  52.  
  53. void 
  54. gsl_siman_solve_many (const gsl_rng * r, void *x0_p, gsl_Efunc_t Ef,
  55.               gsl_siman_step_t take_step,
  56.               gsl_siman_metric_t distance,
  57.               gsl_siman_print_t print_position,
  58.               size_t element_size,
  59.               gsl_siman_params_t params);
  60.  
  61. #endif /* GSL_SIMAN_H */
  62.